from pylab import *

k_min = 1e-3
k_max = 100
k_num = 10
lnk_min = log(k_min)
lnk_max = log(k_max)
dlnk = (lnk_max-lnk_min)/(k_num-1)


k = []
lbs = []

for i in range(k_num):
    k = exp(lnk_min+i*dlnk)
    lbs.append('k='+str(round(k,5)))

#lbs = ['k=0.001', 'k=0.01', 'k=0.1', 'k=1', 'k=10']

#h0 = loadtxt('../outputs/k=0.001.txt')
#h1 = loadtxt('../outputs/k=0.01.txt')
#h2 = loadtxt('../outputs/k=0.1.txt')
#h3 = loadtxt('../outputs/k=1.txt')
#h4 = loadtxt('../outputs/k=10.txt')

for i in range(k_num):
    h = loadtxt('../outputs/k='+str(i)+'.txt')
    semilogx(h[:,0], h[:,1], '--', label=lbs[i])

legend(loc='best')
grid()

#semilogx(h0[:,0], h0[:,1], 'r-', label=lbs[0])
#semilogx(h1[:,0], h1[:,1], 'g-', label=lbs[1])
#semilogx(h2[:,0], h2[:,1], 'b-', label=lbs[2])
#semilogx(h3[:,0], h3[:,1], 'm-', label=lbs[3])
#semilogx(h4[:,0], h4[:,1], 'k-', label=lbs[4])

legend(loc='best')
grid()

ax = gca()
ax.set_xlabel(r'$k$')
ax.set_ylabel(r'$h$')

tight_layout()


show()
